main(n,m,r)
{
	for(gets(&n);~scanf("%d",&n);printf("%d\n",r))
		for(r=m=0;m++<n;)r+=m/2.*(m+1);
}
